<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    * {
        margin: 0;
        padding: 0;
    }

    .box {
        position: relative;
        width: 200px;
        height: 200px;

    }

    .box1,.box2 {
        position: absolute;
        width: 100px;
        height: 100px;
        z-index: 1;
    }

    .box1 {
        background-color: pink;
        top: 10px;
        left: 10px;
    }

    .box2 {
        background-color: aqua;
        top: 20px;
        left: 20px;
        z-index: 3;
    }
    .box3{
        position: absolute;
        top: 50px;
        left: 50px;
        background-color: orange;
        width: 100px;
        height: 100px;
        z-index: 2;
    }
</style>

<body>
    <div class="box">
        <div class="box1"></div>
        <div class="box2"></div>
    </div>
    <div class="box3"></div>
</body>

</html>